﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE FarmOverview

AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
SELECT server.Name, server.Role, server.RAMCapacity, sum(Disk.Size) as totalsize, sum(disk.Used) as spaceused
  FROM [SharePointOptimizer].[dbo].[Server] as server, SharePointOptimizer.dbo.Disk as disk 
  where server.ServerID = disk.ServerID
  group by server.Name, server.RAMCapacity, server.Role
END